<script setup lang="ts">
import vConsole from "vconsole";

window.onload = function () {
  document.addEventListener("touchstart", function (event) {
    if (event.touches.length > 1) {
      event.preventDefault();
    }
  });
  document.addEventListener("gesturestart", function (event) {
    event.preventDefault();
  });
  /**
   * 开发环境 vConsole 开启
   */

  console.log(import.meta.env.VITE_APP_VCONSOLE, "开发环境");
  if (import.meta.env.VITE_APP_VCONSOLE == true) {
    new vConsole();
  }
};
</script>

<template>
  <div>
    <router-view />
  </div>
</template>

<style lang="less">
html {
  overflow: hidden;
}
body {
  overflow: scroll;
  overscroll-behavior-y: contain;
}
html,
body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  transition: background-color 0.25s;
  color: var(--color-text);
  background-color: var(--color-body);
  font-family: "newfont" !important;
}
@font-face {
  font-family: "newfont";
  // 华为鸿蒙字体
  src: url("@/assets/font/new_font.ttf");
}
</style>
